# -*- coding;utf-8 -*-
"""
File name : myFilter.py.PY
Program IDE : PyCharm
Create file time: 2023/7/5 0:04
File Create By Author : 朱清闯
"""
from django_filters import rest_framework as filters
from account.models import UserActivateApplication
from question.models import GuidePaper


class UserActivateApplicationFilter(filters.FilterSet):
    real_name = filters.CharFilter(field_name='user__real_name', lookup_expr='icontains')
    phone = filters.CharFilter(field_name='user__phone', lookup_expr='icontains')

    class Meta:
        model = UserActivateApplication
        fields = ('user', )


class GuidePaperFilter(filters.FilterSet):
    title = filters.CharFilter(field_name='title', lookup_expr='icontains')

    class Meta:
        model = GuidePaper
        fields = ['title']


